$OpenBSD: patch-src_drivers_usb_bsd_bsd-usb_c,v 1.3 2015/07/18 12:04:54 kirby Exp $

the USB_DEVICEINFO ioctl only needs read access.  open the bus O_RDONLY
to not require write permission.

--- src/drivers/usb/bsd/bsd-usb.c.orig	Sat Jan  3 00:34:23 2015
+++ src/drivers/usb/bsd/bsd-usb.c	Sat Jul 18 14:22:52 2015
@@ -216,7 +216,7 @@ bool BsdUsbUpsDriver::open_usb_device()
    /* Max of 10 USB busses */
    for (i = 0; i < 10; i++) {
       busname[8] = '0' + i;
-      fd = open(busname, O_RDWR | O_NOCTTY);
+      fd = open(busname, O_RDONLY | O_NOCTTY);
       if (fd == -1)
          continue;
 
